<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/firstint.css">
    <link rel="stylesheet" href="../css/donghua.css">
    <link rel="stylesheet" href="../css/create.css">
    <link rel="stylesheet" href="../font_3284096_xdkog32r6d/iconfont.css">
</head>

<body>
    <div id="header">
        <div class="header-center">
            <div class="logo">
                <a href="../html/firstint.html"><img src="../img/GIF/gif3.gif" alt="" style="height: 70px;width: 70px;padding-left: 30px;"></a>
            </div>
            <div class="list">
                <ul class="list-all">
                    <li>
                        <a href="goods.html">帽子</a> </li>
                    <li>
                        <a href="goods.html">外套</a> </li>
                    <li>
                        <a href="goods.html">裤子</a>
                    </li>
                    <li>
                        <a href="goods.html">背包</a>
                    </li>
                </ul>
            </div>
            <div class="search">
                <input type="text" text="搜索">
                <span class="iconfont icon-sousuo_o"></span>
            </div>
            <div class="user">
                <span class="iconfont  icon-201yonghu_yonghu2" style="font-size: 30px;line-height: 70px;"></span>
                <div style="font-size: 20px;line-height: 70px;text-decoration: none;color: black" class="denglu"><a href="login.html" style="color: black;text-decoration: none;">登录/</a></div>
                <div style="font-size: 20px;line-height: 70px;text-decoration: none;color: black" class="zhuce"> <a href="create.html" style="color: black;text-decoration: none;">注册</a></div>
            </div>
            <div class="shoppingcar">
                <a href="../html/shoppingcar.html" style="text-decoration: none;color: black;"><span class="iconfont icon-gouwuche" style="font-size: 30px;line-height: 70px;"></span></a>
            </div>
            <div class="GPS-mao">

                <div class="GPS-mao-list">
                    <ul>
                        <a href="">
                            <li>
                                palace普通款
                            </li>
                        </a>
                        <a href="">
                            <li>
                                palace联名款
                            </li>
                        </a>

                        </li>
                    </ul>
                </div>
                <div class="GPS-mao-imgs">
                    <ul>
                        <li>
                            <a href="goods.html"><img src="../img/CLOTHESLIST/HATS/HATS4.webp" alt=""></a>
                        </li>
                        <li>
                            <a href="goods.html"><img src="../img/CLOTHESLIST/HATS/HATS5.webp" alt=""></a>
                        </li>
                        <li>
                            <a href="goods.html"><img src="../img/CLOTHESLIST/HATS/HATS6.webp" alt=""></a>
                        </li>
                        <li>
                            <a href="goods.html"><img src="../img/CLOTHESLIST/HATS/HATS8.webp" alt=""></a>
                        </li>
                    </ul>


                </div>
            </div>
            <div class="GPS-jacket">

                <div class="GPS-jacket-list">
                    <ul>
                        <li>
                            <a href="">普通款 </a>
                        </li>
                        <li>
                            <a href="">联名款</a>
                        </li>
                    </ul>
                </div>
                <div class="GPS-jacket-imgs">
                    <img src="../img/CLOTHESLIST/JACKETS/JACKETS1.webp" alt="">
                    <img src="../img/CLOTHESLIST/JACKETS/JACKETS2.webp" alt="">
                    <img src="../img/CLOTHESLIST/JACKETS/JACKETS3.webp" alt="">
                    <img src="../img/CLOTHESLIST/JACKETS/JACKETS4.webp" alt="">
                </div>
            </div>
            <div class="GPS-pants">
                <div class="GPS-pants-list">
                    <ul>
                        <li>
                            <a href="">普通款</a> </li>
                        <li>
                            <a href="">联名款</a> </li>
                        <li>
                </div>
                <div class="GPS-pants-imgs">
                    <img src="../img/CLOTHESLIST/BOTTOMS/BOTTOMS1.webp" alt="">
                    <img src="../img/CLOTHESLIST/BOTTOMS/BOTTOMS2.webp" alt="">
                    <img src="../img/CLOTHESLIST/BOTTOMS/BOTTOMS3.webp" alt="">
                    <img src="../img/CLOTHESLIST/BOTTOMS/BOTTOMS4.webp" alt="">
                </div>
            </div>
            <div class="GPS-bag">
                <div class="GPS-bag-list">
                    <ul>

                        <li>
                            <a href="">普通款</a> </li>
                        <li>
                            <a href="">联名款</a> </li>
                        <li>
                    </ul>
                </div>
                <div class="GPS-bag-imgs">
                    <img src="../img/CLOTHESLIST/BAGS/BAGS1.webp" alt="">
                    <img src="../img/CLOTHESLIST/BAGS/BAGS3.webp" alt="">
                    <img src="../img/CLOTHESLIST/BAGS/BAGS4.webp" alt="">
                    <img src="../img/CLOTHESLIST/BAGS/BAGS6.webp" alt="">

                </div>
            </div>
        </div>
    </div>
    <div class="create-remind ">注册</div>
    <div class="create-message">
        <div class="create-inner">
            <div class="create-center">
                <div style="border-bottom: 1px solid gray;font-size: 40px;">注册账户</div>
                <div class="create-num">
                    <span style="line-height: 20px;">姓名</span>
                    <br><input type="text" class="Name" id="username">
                    <br> <span>*密码</span>
                    <br><input type="password" id="userpass">
                    <br><span id="yz"></span>
                    <br><span id="zc"></span>
                </div>
                <div class="create-foot">
                    <div class="create-btn">
                        <span><input type="checkbox" style="width: 20px;height: 20px;">  显示密码</span>
                        <span><input type="checkbox" style="width: 20px;height: 20px;">  我承诺点击(提交)按钮即表示我已阅读,理解并接受隐私政策,使用条款及退货 &nbsp;&nbsp;&nbsp;&nbsp; 政策的详细内容。</span>
                        <button style="border: none;background-color: red;height: 40px;width: 70px;color: white;" class="zhuce-btn">注册用户</button>
                    </div>
                </div>
            </div>
        </div>

    </div>
    <div class="bigdonghua">
        <div class="bigdonghua-center">
            <div class="donghua"></div>
            <div class="donghua"></div>
            <div class="donghua"></div>
            <div class="donghua">
            </div>
        </div>

    </div>
    <div class="foot ">
        <div class="foot-center ">
            <div class="foot-head ">
                <div class="place ">
                    <span class="iconfont icon-zuobiao " style="font-size: 40px;color: red; "></span>
                    <span>查找店铺</span>

                </div>
                <div class="follow ">
                    <span class="iconfont icon-aite " style="font-size: 40px;color: red; "></span>
                    <span>订阅资讯</span>
                </div>
            </div>
            <div class="survice ">
                <div class="survice-one ">
                    <h3>帮助中心</h3>
                    <ul>
                        <li><a href=" "> 购买须知</a></li>
                        <li>
                            <a href=" ">配送及费用</a>
                        </li>
                        <li>
                            <a href=" ">支付方式</a>
                        </li>
                        <li>
                            <a href=" ">退货政策</a>
                        </li>
                    </ul>
                </div>
                <div class="survice-one ">
                    <h3>我的订单</h3>
                    <ul>
                        <li>
                            <a href=" ">订单查询</a>
                        </li>
                        <li>
                            <a href=" ">关于发票</a>
                        </li>
                    </ul>
                </div>
                <div class="survice-one ">
                    <h3>关于NB</h3>
                    <ul>
                        <li>
                            <a href=" ">品牌故事</a>
                        </li>
                        <li>
                            <a href=" ">隐私政策</a>
                        </li>
                        <li>
                            <a href=" ">使用条款</a>
                        </li>
                    </ul>
                </div>
                <div class="survice-one ">
                    <h3>保持联系</h3>
                    <span class="iconfont icon-weixin " style="font-size: 50px; "></span>
                    <span class="iconfont icon-weibo " style="font-size: 50px; "></span>
                    <br><span style="font-size: 12px; ">客服热线：<br>
                        800-820-2887(请使用固话拨打)<br>
                        400-890-2887(请使用手机拨打)<br>
                        电话服务时间：周一~周五 9AM~6PM（节假日除外）<br>
                        在线服务时间：<br>
                        周一 ~ 周日<br>
                        9AM ~ 10PM<br></span>
                </div>
            </div>

        </div>
    </div>

    <div id="myBtn">↑</div>
</body>

</html>
<script src="../js/GPS.js"></script>
<script src="../js/jquery-3.2.1.min.js"></script>
<script>
    $(".Name").blur(function() {
        var username = $("#username").val();
        var data = {
            "username": username,
        };
        $.ajax({
            url: "./PHP/checkUser.php",
            type: 'get',
            data: data,
            success: function(res) {
                if (res.trim() == "1") {
                    $("#yz").css("color", "blue").text("用户名可用！");
                } else if (res.trim() == "0") {
                    $("#yz").css("color", "red").text("用户名不可用！");
                } else {
                    $("#yz").css("color", "red").text("连接错误！");
                }
            }
        })
    })
    $(".zhuce-btn").click(function() {
        var username = $("#username").val();
        var userpass = $("#userpass").val();
        var data = {
            "username": username,
            "userpass": userpass,
        };
        if (username && userpass) {

            $.ajax({
                url: "./PHP/addUser.php",
                type: 'post',
                data: data,
                success: function(res) {
                    console.log(res);
                    if (res.trim() == "success") {
                        $("#zc").css("color", "blue").text("注册成功！");
                        window.location.href = "login.html";
                    } else {
                        $("#zc").css("color", "red").text("注册失败！");
                    }
                }
            });
        } else {
            alert("请认真核对！")
        }
    })
</script>